package cn.sunxyz.idea.demo.proxy;

/**
 * Created by yangrd on 2017/5/25.
 */
class ProxyManger {

    public static <T> T getProxy(Singleton singleton) {
        return (T) singleton.getProxy();
    }

    public enum Singleton {
        ADVICE_PROXY(new AdviceProxy()),
        HANDLER_PROXY(new HandlerProxy());
        private Proxy proxy;

        Singleton(Proxy proxy) {
            this.proxy = proxy;
        }

        private Proxy getProxy() {
            return proxy;
        }
    }

}
